<template>
  <div class="pk-container">
    <k-image
      src="//i.thsi.cn/staticS3/mobileweb-upload-static-server.img/m/atom/690ba4d7-52ba-489e-860c-fe00a32a4499.png"
      alt=""
      class="pk"
      @click="jumpToSearch"
    />
  </div>
</template>

<script setup lang="ts">
import { sendClickStat } from '@/utils/stat';
import { PAGEID } from '@/config/stat';
import { jumpByUrl } from '@/utils';
interface Props {
  stockCode: string;
  stockName: string;
}
const props = defineProps<Props>();
const jumpToSearch = () => {
  sendClickStat(`${PAGEID.STOCK}.pk.click`);
  jumpByUrl({
    name: 'pksearch',
    query: { stockCode: props.stockCode, stockName: props.stockName },
  });
};
</script>

<style scoped lang="less">
.pk-container {
  .pk {
    position: absolute;
    top: 0;
    right: 0;
    width: 188px;
    height: 60px;
  }
}
</style>
